﻿using Orleans.Streams;
using System;

namespace Gasgoo.ShareLibrary.Framework.iQueueProvider
{
    public interface IQueueProvider : IStreamProvider
    {
    }

    public class DefaultQueueProvider : IQueueProvider
    {
        private readonly IStreamProvider streamProvider;
        public string Name => streamProvider.Name;
        public bool IsRewindable => streamProvider.IsRewindable;
        public DefaultQueueProvider(IStreamProvider streamProvider)
        {
            this.streamProvider = streamProvider;
        }

        public IAsyncStream<T> GetStream<T>(Guid streamId, string streamNamespace)
        {
            return streamProvider.GetStream<T>(streamId, streamNamespace);
        }
    }

}
